home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / AIncludes / DriverFamilyMatching.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  5.7 KB  |  157 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        DriverFamilyMatching.a
  3. ;
  4. ;    Contains:    Interfaces for create native drivers NDRV
  5. ;
  6. ;    Version:    Technology:    
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1995-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__DRIVERFAMILYMATCHING__') = 'UNDEFINED' THEN
  18. __DRIVERFAMILYMATCHING__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__NAMEREGISTRY__') = 'UNDEFINED' THEN
  24.     include 'NameRegistry.a'
  25.     ENDIF
  26.     IF &TYPE('__CODEFRAGMENTS__') = 'UNDEFINED' THEN
  27.     include 'CodeFragments.a'
  28.     ENDIF
  29.  
  30.  
  31. ;  ##############################################
  32. ;   Well known properties in the Name Registry
  33. ;  ##############################################
  34.  
  35.  
  36. ;  CPassThru 
  37.  
  38. ;  #########################################################
  39. ;   Descriptor for Drivers and NDRVs
  40. ;  #########################################################
  41.  
  42.  
  43. ;  
  44. ;    QuickTime 3.0: "DriverType" has a name collision with cross-platform code.
  45. ;    Use Mac prefix to avoid collision 
  46. ;
  47.  
  48. ;  Driver Typing Information Used to Match Drivers With Devices 
  49. MacDriverType            RECORD 0
  50. nameInfoStr                 ds        Str31            ; offset: $0 (0)        ;  Driver Name/Info String
  51. version                     ds        NumVersion        ; offset: $20 (32)        ;  Driver Version Number
  52. sizeof                     EQU *                    ; size:   $24 (36)
  53.                         ENDR
  54.     IF TARGET_OS_MAC THEN
  55. DriverType                RECORD 0
  56. f                         ds        MacDriverType
  57. sizeof                     EQU *                    ; size:   $24 (36)
  58.                         ENDR
  59.  
  60.  
  61.     ENDIF    ; TARGET_OS_MAC
  62. ; typedef struct MacDriverType *        DriverTypePtr
  63.  
  64. ;  OS Runtime Information Used to Setup and Maintain a Driver's Runtime Environment 
  65. ; typedef OptionBits                     RuntimeOptions
  66.  
  67.  
  68. kDriverIsLoadedUponDiscovery    EQU        $00000001            ; auto-load driver when discovered
  69. kDriverIsOpenedUponLoad            EQU        $00000002            ; auto-open driver when loaded
  70. kDriverIsUnderExpertControl        EQU        $00000004            ; I/O expert handles loads/opens
  71. kDriverIsConcurrent                EQU        $00000008            ; supports concurrent requests
  72. kDriverQueuesIOPB                EQU        $00000010            ; device manager doesn't queue IOPB
  73. kDriverIsLoadedAtBoot            EQU        $00000020            ; Driver is loaded at the boot time 
  74. kDriverIsForVirtualDevice        EQU        $00000040            ; Driver is for a virtual Device 
  75. kDriverSupportDMSuspendAndResume EQU    $00000080            ; Driver supports Device Manager Suspend and Resume command 
  76. DriverOSRuntime            RECORD 0
  77. driverRuntime             ds.l    1                ; offset: $0 (0)        ;  Options for OS Runtime
  78. driverName                 ds        Str31            ; offset: $4 (4)        ;  Driver's name to the OS
  79. driverDescReserved         ds.l    8                ; offset: $24 (36)        ;  Reserved area
  80. sizeof                     EQU *                    ; size:   $44 (68)
  81.                         ENDR
  82. ; typedef struct DriverOSRuntime *        DriverOSRuntimePtr
  83.  
  84. ;  OS Service Information Used To Declare What APIs a Driver Supports 
  85. ; typedef UInt32                         ServiceCount
  86.  
  87. DriverServiceInfo        RECORD 0
  88. serviceCategory             ds.l    1                ; offset: $0 (0)        ;  Service Category Name
  89. serviceType                 ds.l    1                ; offset: $4 (4)        ;  Type within Category
  90. serviceVersion             ds        NumVersion        ; offset: $8 (8)        ;  Version of service
  91. sizeof                     EQU *                    ; size:   $C (12)
  92.                         ENDR
  93. ; typedef struct DriverServiceInfo *    DriverServiceInfoPtr
  94.  
  95. DriverOSService            RECORD 0
  96. nServices                 ds.l    1                ; offset: $0 (0)        ;  Number of Services Supported
  97. service                     ds        DriverServiceInfo ; offset: $4 (4) <-- really an array of length one ;  The List of Services (at least one)
  98. sizeof                     EQU *                    ; size:   $10 (16)
  99.                         ENDR
  100. ; typedef struct DriverOSService *        DriverOSServicePtr
  101.  
  102. ;  Categories 
  103.  
  104. kServiceCategoryDisplay            EQU        'disp'                ; Display Manager
  105. kServiceCategoryOpenTransport    EQU        'otan'                ; Open Transport
  106. kServiceCategoryBlockStorage    EQU        'blok'                ; Block Storage
  107. kServiceCategoryNdrvDriver        EQU        'ndrv'                ; Generic Native Driver
  108. kServiceCategoryScsiSIM            EQU        'scsi'                ; SCSI 
  109. kServiceCategoryFileManager        EQU        'file'                ; File Manager 
  110. kServiceCategoryIDE                EQU        'ide-'                ; ide 
  111. kServiceCategoryADB                EQU        'adb-'                ; adb 
  112. kServiceCategoryPCI                EQU        'pci-'                ; pci bus 
  113.                                                             ; Nu Bus 
  114. kServiceCategoryDFM                EQU        'dfm-'                ; DFM 
  115. kServiceCategoryMotherBoard        EQU        'mrbd'                ; mother Board 
  116. kServiceCategoryKeyboard        EQU        'kybd'                ; Keyboard 
  117. kServiceCategoryPointing        EQU        'poit'                ; Pointing 
  118. kServiceCategoryRTC                EQU        'rtc-'                ; RTC 
  119. kServiceCategoryNVRAM            EQU        'nram'                ; NVRAM 
  120. kServiceCategorySound            EQU        'sond'                ; Sound (1/3/96 MCS) 
  121. kServiceCategoryPowerMgt        EQU        'pgmt'                ; Power Management 
  122. kServiceCategoryGeneric            EQU        'genr'                ; Generic Service Category to receive general Events 
  123. ;  Ndrv ServiceCategory Types 
  124.  
  125. kNdrvTypeIsGeneric                EQU        'genr'                ; generic
  126. kNdrvTypeIsVideo                EQU        'vido'                ; video
  127. kNdrvTypeIsBlockStorage            EQU        'blok'                ; block storage
  128. kNdrvTypeIsNetworking            EQU        'netw'                ; networking
  129. kNdrvTypeIsSerial                EQU        'serl'                ; serial
  130. kNdrvTypeIsParallel                EQU        'parl'                ; parallel 
  131. kNdrvTypeIsSound                EQU        'sond'                ; sound
  132. kNdrvTypeIsBusBridge            EQU        'brdg'
  133. ; typedef UInt32                         DriverDescVersion
  134.  
  135. ;     The Driver Description 
  136.  
  137. kInitialDriverDescriptor        EQU        0
  138. kVersionOneDriverDescriptor        EQU        1
  139.  
  140. kTheDescriptionSignature        EQU        'mtej'
  141. kDriverDescriptionSignature        EQU        'pdes'
  142.  
  143. DriverDescription        RECORD 0
  144. driverDescSignature         ds.l    1                ; offset: $0 (0)        ;  Signature field of this structure
  145. driverDescVersion         ds.l    1                ; offset: $4 (4)        ;  Version of this data structure
  146. driverType                 ds        MacDriverType    ; offset: $8 (8)        ;  Type of Driver
  147. driverOSRuntimeInfo         ds        DriverOSRuntime ; offset: $2C (44)        ;  OS Runtime Requirements of Driver
  148. driverServices             ds        DriverOSService ; offset: $70 (112)        ;  Apple Service API Membership
  149. sizeof                     EQU *                    ; size:   $80 (128)
  150.                         ENDR
  151. ; typedef struct DriverDescription *    DriverDescriptionPtr
  152.  
  153.  
  154.  
  155.     ENDIF ; __DRIVERFAMILYMATCHING__ 
  156.  
  157.